Repository navigation
Clean up native Codegen staging directories - #60058
Open
jipeng6036-del wants to merge 1 commit into
Open
jipeng6036-del wants to merge 1 commit into
jipeng6036-del wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #60057. The Codegen executor stages each library's generated files in a temporary directory and copies them to the configured output. Repeated invocations leave those staging directories behind. Remove the fresh staging directory in a
finallyblock so it is cleaned up after both successful generation and a generator error.Thanks to @YevheniiKotyrlo for the CLI reproducer and the build observations. I used Codex to help implement and verify the fix.
Changelog:
[GENERAL] [FIXED] - Clean up temporary native Codegen artifacts after generation.
Test Plan:
scripts/generate-codegen-artifacts.jsfor a minimal iOS module fixture on Windows. The three generated files were byte-for-byte identical before and after the fix, and the temporary directory went from one leftover entry to zero.